/*
 * Copyright (c) 2014 traceid. All Rights Reserved.
 */

package com.cgmnx.admin.dao.mapper.rbac;

import com.cgmnx.admin.dao.entity.rbac.RoleResourceRelationEntity;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface RoleResourceRelationMapper {

    int save(RoleResourceRelationEntity entity);

    int saveAll(@Param("entityList") List<RoleResourceRelationEntity> entityList);

    int delete(@Param("id") Integer id);

    int deleteByRoleId(@Param("roleId") Integer roleId);

    List<RoleResourceRelationEntity> query(@Param("resourceId") Integer resourceId);

    Integer count(@Param("roleId") Integer roleId);


}
